package com.foreknow.dao;

import com.foreknow.model.Business;

import java.sql.SQLException;
import java.util.List;

/**
 * @author shkstart
 * @create 2021-08-05 15:50
 */
public interface BusinessDao {
    /**
     * 显示全部信息
     * @return
     * @throws SQLException
     */
    public List<Object>  getQueryAll()throws SQLException;

    /**
     * 添加
     * @param business
     * @return
     * @throws SQLException
     */
    public boolean save(Business business)throws SQLException;

    /**
     * 删除
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean delete(int id)throws SQLException;

    /**
     * 根据id查询
     * @param id
     * @return
     * @throws SQLException
     */
    public Object getQueryById(int id )throws SQLException;

    /**
     * 修改
     * @param business
     * @return
     * @throws SQLException
     */
    public boolean Updatedao(Business business)throws SQLException;

    /**
     * 根据姓名模糊查询
     * @return
     * @throws SQLException
     */
    public List<Object>  getNameAll(String name)throws SQLException;
}
